package com.sky.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.entity.Address;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;

@Mapper
public interface AddressMapper extends BaseMapper<Address> {
    // 根据学生ID查询地址列表
    List<Address> selectByStudentId(Long studentId);
    // 根据ID查询地址
    Address selectById(Long id);
    // 设置默认地址
    void setDefaultAddress(Long id);
    // 取消其他地址的默认状态
    void cancelOtherDefaultAddresses(Long studentId, Long excludeId);
}